<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>报修登记管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
		
			$("#btnExport").click(function(){
				top.$.jBox.confirm("确认要导出报修信息数据吗？","系统提示",function(v,h,f){
					if(v=="ok"){
						$("#searchForm").attr("action","${ctx}/registration/dmsRegistration/export");
						$("#searchForm").submit();
					}
				},{buttonsFocus:1});
				top.$('.jbox-body .jbox-icon').css('top','60px');
			});
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
	<link type="text/css" rel="stylesheet" href="${ctxStatic}/css/dmsRegistrationForm.css" />
	<script type="text/javascript" src="${ctxStatic}/js/dmsRegistrationForm.js"></script>
	<script type="text/javascript" src="${ctxStatic}/layer/layer.js"></script>
</head>
<body>
	
	 <ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/registration/dmsRegistration/">报修登记列表</a></li>
		<%-- <shiro:hasPermission name="registration:dmsRegistration:edit"><li><a href="${ctx}/registration/dmsRegistration/form">报修登记添加</a></li></shiro:hasPermission> --%>
	</ul> 
	<form:form id="searchForm" modelAttribute="dmsRegistration" action="${ctx}/registration/dmsRegistration/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>宿舍号：</label>
				<form:input path="dormitoryNumber" htmlEscape="false" maxlength="64" class="input-medium w"/>
			</li>
			<li><label>修理人：</label>
				<form:input path="repairName" htmlEscape="false" maxlength="64" class="input-medium w"/>
			</li>
			<li><label>报修日期：</label>
				<input name="repairDate" type="text" readonly="readonly" maxlength="20" class="input-medium m Wdate"
					value="<fmt:formatDate value="${dmsRegistration.repairDate}" pattern="yyyy-MM-dd"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="btns">
			<input id="btnExport" class="btn btn-primary" type="button" value="导出"/>
			</li>
			<li class="btns"><a href="${ctx}/registration/dmsRegistration/form"><input id="btnSubmit" class="btn btn-primary" type="button" value="报修登记添加"/></a></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>报修人</th>
				<th>宿舍号</th>
				<th>修理人</th>
				<th>报修日期</th>
				<th>报修物品</th>
				<th>报修结果</th>
				<th>备注</th>
	<%-- 			<shiro:hasPermission name="registration:dmsRegistration:edit"><th>操作</th></shiro:hasPermission> --%>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="dmsRegistration">
			<tr>
				<td><%-- <a href="${ctx}/registration/dmsRegistration/form?id=${dmsRegistration.id}"> --%>
					${dmsRegistration.studentRepairName}
				<!-- </a> --></td>
				<td>
					${dmsRegistration.dormitoryNumber}
				</td>
				<td>
					${dmsRegistration.repairName}
				</td>
				<td>
					<fmt:formatDate value="${dmsRegistration.repairDate}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					${dmsRegistration.repairThings}
				</td>
				<td>
					${dmsRegistration.repairResult}
				</td>
				<td>
					${dmsRegistration.remarks}
				</td>
<%-- 				<shiro:hasPermission name="registration:dmsRegistration:edit"><td>
    				<a href="${ctx}/registration/dmsRegistration/form?id=${dmsRegistration.id}">修改</a>
					<a href="${ctx}/registration/dmsRegistration/delete?id=${dmsRegistration.id}" onclick="return confirmx('确认要删除该报修登记吗？', this.href)">删除</a> 
				</td></shiro:hasPermission> --%>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>